﻿#include<iostream>
using namespace std;
void meun1()//if else
{
	char input;
	while (1)
	{
		cout << "---------------------------请选择您要进行的操作(字母即可):---------------------------" << endl;
		cout << "------------------------A(Add)                       D(Delete------------------------" << endl;
		cout << "------------------------S(Sort)                      Q(Quit)-------------------------" << endl;
		cin >> input;
		if (input == 'A')
			cout << "数据已经增加" << endl;
		else if (input == 'D')
			cout << "数据已经删除" << endl;
		else if (input == 'S')
			cout << "数据已经排序" << endl;
		else if (input == 'Q')
		{
			cout << "程序已经结束" << endl;
			break;
		}
		else cout << "并没有此操作呢，请重新输入试试!" << endl;
	}
}
void meun2()//switch
{
	char input;
	while (1)
	{
		cout << "---------------------------请选择您要进行的操作(字母即可):---------------------------" << endl;
		cout << "------------------------A(Add)                       D(Delete------------------------" << endl;
		cout << "------------------------S(Sort)                      Q(Quit)-------------------------" << endl;
		cin >> input;
		switch (input)
		{
		case 'A':
			cout << "数据已经增加" << endl;
			break;
		case 'D':
			cout << "数据已经删除" << endl;
			break;
		case 'S':
			cout << "数据已经排序" << endl;
			break;
		case 'Q':
			cout << "程序已经结束" << endl;
			return;
		default:
			cout << "并没有此操作呢，请重新输入试试!!!" << endl;
			break;
		}
	}
}
//int main()
//{
//	meun1();
//	//meun2();
//	return 0;
//}
//class A
//{
//public:
//	A()  {	 cout << "A()" << endl;  }
//};
//class B
//{
//public:
//	B()  {	cout << "B()" << endl;   }
//};
//class C :public A
//{
//public:
//	C()  {	 cout << "C()" << endl;  }
//protected:
//	B b;
//};
//int main()
//{
//	C c;
//	return 0;
//}
struct B
{
	B()  {   cout << "B()" << endl;  }
};
struct A
{
	A()  {	cout << "A()" << endl;   }
};
struct E
{
	E()  {	cout << "E()" << endl;   }
};
struct D
{
	D() { cout << "D()" << endl; }
};
struct BB
{
	BB() {	cout << "BB()" << endl;  }
};
struct C :BB, A, B
{
	C()  {  cout << "C()" << endl;   }
protected:
	D _e;
	E _d;
};
int main()
{
	C c;	
	return 0;
}